package com.googlecode.jsimplemarket.wicket;


import com.googlecode.jsimplemarket.security.SpringSubject;
import org.apache.wicket.Session;
import org.apache.wicket.request.Request;
import org.wicketstuff.security.WaspApplication;
import org.wicketstuff.security.WaspSession;

/**
 *
 * @author alex
 */
public class SecuredWebSession extends WaspSession {
    private static final long serialVersionUID = 1L;
    private SpringSubject userDetail;
    
    public SecuredWebSession(WaspApplication application, Request request) {
        super(application, request);
    }
    
    public static WaspSession getSpringWicketWebSession() {
        return (WaspSession) Session.get();
    }

    public SpringSubject getUserDetail() {
        return userDetail;
    }

    public void setUserDetail(SpringSubject userDetail) {
        this.userDetail = userDetail;
    }
    
    public static SecuredWebSession get() {
        return (SecuredWebSession) Session.get();
    }	
}
